// 1104.[模拟字符串double] 电话号码转换
// https://oj.rnd.huawei.com/problems/1104/details 中文数字单词：Yi Er San Si Wu
// Liu Qi Ba Jiu Ling 英文数字单词：One Two Three Four Five Six Seven Eight Nine
// Zero SixOneThreeOneDoubleZero 输出 LiuYiSanYiLingLing 输入 YiLingSanSanJiu
//输出 OneZeroThreeThreeNine
//注意：SanSan不能转换为 DoubleThree

#include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;

#define PF(...)            \
  do {                     \
    if (g_debug) {         \
      printf(__VA_ARGS__); \
    }                      \
  } while (0)

bool g_debug = false;
#define strError "ERROR"

class Solution {
  vector<string> vctWord = {"Yi",    "Er",   "San",   "Si",   "Wu",    "Liu",
                            "Qi",    "Ba",   "Jiu",   "Ling", "One",   "Two",
                            "Three", "Four", "Five",  "Six",  "Seven", "Eight",
                            "Nine",  "Zero", "Double"};
  const int ID_Double = 20;

  enum Lang {
    Lang_En = -1,
    Lang_unknown = 0,
    Lang_Cn = 1,
  };
  int getWordType(int index) {
    if (0 <= index && index < 10) {
      return Lang_Cn;
    } else if (10 <= index && index < 21) {
      return Lang_En;
    }  //
    return Lang_unknown;
  }
  int getWordIndex(const string& wd) {
    for (int i = 0; i < vctWord.size(); i++) {
      if (wd == vctWord[i]) {
        return i;
      }
    }
    return -1;
  }

 public:
  // 待实现函数，在此函数中填入答题代码
  string Translate(const string& input) {
    PF("%s\n", input.c_str());
    string result;
    vector<string> vtSrc;
    string sRecord;
    for (int i = 0; i < input.length(); i++) {
      if (isupper(input[i]) && !sRecord.empty()) {
        vtSrc.push_back(sRecord);
        sRecord = input[i];
      } else {
        sRecord += input[i];
      }
    }
    if (!sRecord.empty()) vtSrc.push_back(sRecord);
    for (auto it : vtSrc) PF("%s,", it.c_str());
    PF("\n");
    if (vtSrc.size() <= 0) {
      return strError;
    }
    int nLang = Lang_unknown;
    int nLastDble = 0;
    for (int i = 0; i < vtSrc.size(); i++) {
      string tmp = vtSrc[i];
      PF("tmp=%s.\n", tmp.c_str());
      int nCurWid = getWordIndex(tmp);
      PF("cur=%d.\n", nCurWid);
      if (nCurWid < 0) {
        return strError;
      }
      int newWdType = getWordType(nCurWid);
      PF("newType=%d.\n", newWdType);
      if (nLang == Lang_unknown) {
        nLang = newWdType;
      } else if (nLang != newWdType) {
        return strError;
      }
      int trWordId = nCurWid + nLang * 10;
      PF("trWdid=%d.\n", trWordId);
      if (trWordId < 0 || trWordId >= vctWord.size()) {
        return strError;
      }
      int nCurDble = (nCurWid == ID_Double);
      if (nCurDble) {
        if (nLastDble) {
          return strError;
        }
        nLastDble = nCurDble;
        continue;
      }
      result += vctWord[trWordId];
      if (nLastDble) {
        result += vctWord[trWordId];
        nLastDble = 0;
      }
      PF("res=%s\n", result.c_str());
    }
    if (nLastDble) {
      result = strError;
    }

    return result;
  }
};

int main() {
  string input = "TwoDouble";
  if (!g_debug) cin >> input;
  Solution solu;
  string result = solu.Translate(input);
  std::cout << result << endl;

  return 0;
}
